package com.suray.basic.wcs.plc.utils;

public enum LifterInfoType {
    LIFTER_LAYER(1, "提升机层"),
    TWO_DIR_CAR(2, "两向车"),
    CAR_PALLET(3, "托盘"),
    ;

    int value;
    String des;
    LifterInfoType(int value, String des) {
        this.value = value;
        this.des = des;
    }

    public int getValue() {
        return value;
    }

    public static LifterInfoType parseType(int value) {
        for (LifterInfoType type : LifterInfoType.values()) {
            if (type.value == value) {
                return type;
            }
        }

        throw new RuntimeException("转换提升机信息类型错误:" + value);
    }

    @Override
    public String toString() {
        return des;
    }
}
